<!-- include tpl=usercp/head title=分享推荐 -->
<script type="text/javascript">
function relation_reload(val)
{
	var url = get_url('usercp','introducer');
	if(val){
		url = get_url('usercp','introducer','month='+val);
	}
	$.phpok.go(url);
}
</script>
<div class="layui-card">
	<div class="layui-card-header">
		推广链接
	</div>
	<div class="layui-card-body">
		<div class="content">{$vlink}</div>
	</div>
</div>
<div class="layui-card">
	<div class="layui-card-header">
		邀请码<small class="gray">（仅限平台开启邀请注册时才有效）</small>
		<div class="float-right">
			<button type="button" class="layui-btn layui-btn-sm" onclick="$.user.vcode()">更新邀请码</button>
		</div>
	</div>
	<div class="layui-card-body">
		{$me.code}
		<br />
		
	</div>
</div>
<!-- if $monthlist -->
<div class="layui-card">
	<div class="layui-card-header">
		统计报表
		<div class="float-right">
			<select class="form-control" onchange="relation_reload(this.value)">
				<option value="">请选择</option>
				<!-- loop from=$monthlist key=$key value=$value id=$tmpid -->
				<option value="{$value.month}"{if $month == $value.month} selected{/if}>{func substr $value.month 0 4}年{func substr $value.month -2}月 ({$value.total}人)</option>
			<!-- /loop -->
			</select>
		</div>
	</div>
	<div class="layui-card-body">
		<table class="table">
		<thead>
		<tr>
			<th>用户账号</th>
			<th>注册时间</th>
			<th>姓名</th>
		</tr>
		</thead>
		<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
		<tr>
			<td>{$value.user}</td>
			<td>{func time_format $value.regtime}</td>
			<td>{$value.fullname}</td>
		</tr>
		<!-- /loop -->
		</table>
		<!-- include tpl=usercp/pagelist -->
	</div>
</div>
<!-- /if -->

<!-- include tpl=usercp/foot -->